package com.cwz.springboot.crawlerfirst.crawler.service.Impl;

import com.cwz.springboot.crawlerfirst.crawler.entity.Item;
import com.cwz.springboot.crawlerfirst.crawler.mapper.ItemMapper;
import com.cwz.springboot.crawlerfirst.crawler.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("itemService")
public class ItemServiceImpl implements ItemService {

    @Autowired
    private ItemMapper itemMapper;

    @Override
    public int save(Item item) {
        return itemMapper.insert(item);
    }

    @Override
    public List<Item> selectAll(Item item) {
        return itemMapper.select(item);
    }
}
